package com.example.analysis.entity;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * evaluate_list_student
 * @author
 */
@Data
public class EvaluateListStudent extends EvaluateListStudentKey implements Serializable {
    private Double evaScore;
    private Date evaTime;
    private String semester;


    public Date getEvaTime() {
        return evaTime;
    }

    public void setEvaTime(Date evaTime) {
        this.evaTime = evaTime;
    }

    private static final long serialVersionUID = 1L;

    public Double getEvaScore() {
        return evaScore;
    }

    public void setEvaScore(Double evaScore) {
        this.evaScore = evaScore;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EvaluateListStudent other = (EvaluateListStudent) that;
        return (this.getSubId() == null ? other.getSubId() == null : this.getSubId().equals(other.getSubId()))
            && (this.getTeacherId() == null ? other.getTeacherId() == null : this.getTeacherId().equals(other.getTeacherId()))
            && (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
            && (this.getQuestId() == null ? other.getQuestId() == null : this.getQuestId().equals(other.getQuestId()))
            && (this.getEvaScore() == null ? other.getEvaScore() == null : this.getEvaScore().equals(other.getEvaScore()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSubId() == null) ? 0 : getSubId().hashCode());
        result = prime * result + ((getTeacherId() == null) ? 0 : getTeacherId().hashCode());
        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
        result = prime * result + ((getQuestId() == null) ? 0 : getQuestId().hashCode());
        result = prime * result + ((getEvaScore() == null) ? 0 : getEvaScore().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", evaScore=").append(evaScore);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

}
